<style>
/*这里是闪烁光标*/
.cursor {
    animation: blink 1s infinite steps(1, start);
    height: 20px;;
}
/*这里设置动画blink*/
@keyframes blink {
    0%, 100% {
        background-color: #000;
        /* color: #aaa; */
    }
    50% {
        background-color: #ffffff; /* not #aaa because it's seem there is Google Chrome bug */
        /* color: #000; */
    }
}
</style>
<div class="cursor"></div>